package day02;

public class CharDemo {
    public static void main(String[] args) {
        //5.char:字符型，2个字节
        char c1 = '女';//字符女
        char c2 = 'f';//字符f
        char c3 = '6';//字符6
        char c4 = ' ';//空格符
       // char c5 = 女;//编译错误，字符型直接量必须放在单引号中
        //char c6 ='';//编译错误，必须有字符
       // char c7 = '10';//编译错误，只能存储1个字符
        char c8 = 65;//0到65535之间
        System.out.println(c8);//println()会依据变量的类型做输出展示
        //c8为char型，所以会以字符的形式输出----A
        char c9 = '\\';
        char c10 = '\'';
        char c11 = '\"';
        System.out.println(c9);
        System.out.println(c10);
        System.out.println(c11);

    }
}
